<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:include value="/comm/header.jsp" />
<s:include value="/comm/menu.jsp" />
<!--第1部分开始  --> 
    <div class="wrap1">
    	<div class="blank1"></div>
        
    	<div class="outbox">


<div class="tab7_tt">搭车求购</div>
<div class="conten7">
 <!--表单内容开始-->

<s:form id="confirm" action="confirmRideBuy" method="post">
<input type="hidden" name="simpleBuyModel.wantBuyModel.wantId" value="<s:property value='wantBuyModel.wantId' />" />
<div class="wrap_left">
	<div class="content7_1">
		<img src="<s:property value='wantBuyModel.absoluteImagePath' />" onload='javascript:DrawImage(this,200,200)'/>
	</div>
</div>
<div class="wrap_left">
	<div class="content7_2">
    	<div class="t1"><span class="span8"><s:property value="wantBuyModel.goodsName" /></span></div>
        
        <div class="content7_2_box">
    
    		<div class="wrap_left">
        
        	<ul>
            <li><strong>类别：</strong><s:property value="wantBuyModel.categoryName" /></li>
   
            <li><strong>物品价格：</strong><span class="span2">￥<s:property value="wantBuyModel.price" /></span> 左右</li>

            <li>
            	<strong>要求提供的单椐类型：</strong>
            	<s:if test="wantBuyModel.receipts == 0">无要求</s:if>
            	<s:elseif test="wantBuyModel.receipts == 1">小票</s:elseif>
            	<s:elseif  test="wantBuyModel.receipts == 2">发票</s:elseif>
            	<s:else>小票或发票</s:else>
            </li>

            <li><strong>已有<s:property value='wantBuyModel.simpleBuys' />人搭车求购</strong></li>
            <li>
            	<strong>求购数量：</strong>
              	<input id="number" name="simpleBuyModel.number" type="text" size="1" value="<s:property value='wantBuyModel.number' />" class="input5"/>
              	<br/>
              	<label id="numberPrompt" style="color:red; display:none">请填写正确的代购数量</label>
             </li>

  
			</ul>
        
        	</div>
       		<div class="wrap_left" style="margin-left:100px">
        
        	<ul>

            <li><strong>所属区域：</strong><s:property value="wantBuyModel.areaName" /></li>
 
            <li>
            	<strong>要求来源：</strong>
            	<s:if test="wantBuyModel.source == 0">不限</s:if>
            	<s:elseif test="wantBuyModel.source == 1">大型超市</s:elseif>
            	<s:elseif test="wantBuyModel.source == 2">便利利</s:elseif>
            	<s:elseif test="wantBuyModel.source == 3">专卖店</s:elseif>
            	<s:elseif test="wantBuyModel.source == 4">生产厂家</s:elseif>
            	<s:else>其他</s:else>
            </li>

            <li><strong>可接受的代购服务费：</strong><span class="span19">￥<s:property value="wantBuyModel.serviceFee" /> </span></li>

            <li><strong>信息有效期：</strong><s:property value="wantBuyModel.validityPeriod" /></li>

            
			</ul>
        
        
        	</div>
        
        	<div class="clear"></div>
        	<div class="t2"><strong>商品描述：</strong></div>
        	<div class="t3"><s:property value="wantBuyModel.description" /></div>
        
        </div>
    
    
		
        
        
	</div>
</div>
<div class="clear"></div>

<div class="but_box1">
	<span class="but_submit"><a href="javascript:void(0)" id="confirmRideBuy">确认搭车</a></span>&nbsp;&nbsp;&nbsp;<span class="but_reg03"><a href="initAddWantBuy.htm?id=<s:property value='wantBuyModel.wantId' />">我要修改</a></span>
</div>
<div class="clear"></div>
</s:form>
        <!--表单内容结束-->
</div>
    

   	  </div>

    </div>
<!--第1部分结束  --> 
<s:include value="/comm/bottom.jsp" />
<SCRIPT type=text/javascript>
	$("#number").focus(function(){$("#numberPrompt").hide();});
	$("#number").blur(function(){validateNumber(trim($("#number").val()));});

	$("#confirmRideBuy").bind("click", function() {
		var number = trim($("#number").val());
		if (!validateNumber(number)) {
			return;
		}
		$("#number").val(number);
		$("#confirm").submit();
	});
	
	function validateNumber(number) {
		if (!digitRegex.test(number)) {
			$("#numberPrompt").show();
			return false;
		}
		return true;
	}
</SCRIPT>